package com.haixiaoke.saas.common.weChat.domain;

import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author panda
 * @Date 2024/4/29
 **/
@Data
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class RefundReqInfo {

    /**
     * 微信订单号
     */
    @XmlElement(name = "transaction_id")
    private String transactionId;

    /**
     * 商户系统内部的订单号
     */
    @XmlElement(name = "out_trade_no")
    private String outTradeNo;

    /**
     * 微信退款单号
     */
    @XmlElement(name = "refund_id")
    private String refundId;

    /**
     * 商户退款单号
     */
    @XmlElement(name = "out_refund_no")
    private String outRefundNo;

    /**
     * 订单总金额，单位为分，只能为整数
     */
    @XmlElement(name = "total_fee")
    private String totalFee;

    /**
     * 退款总金额,单位为分
     */
    @XmlElement(name = "refund_fee")
    private String refundFee;

    /**
     * 退款金额=申请退款金额-非充值代金券退款金额，退款金额<=申请退款金额
     */
    @XmlElement(name = "settlement_refund_fee")
    private String settlementRefundFee;

    /**
     * SUCCESS-退款成功
     * CHANGE-退款异常
     * REFUNDCLOSE—退款关闭
     */
    @XmlElement(name = "refund_status")
    private String refundStatus;

    /**
     * 取当前退款单的退款入账方
     * <p>
     * 1）退回银行卡：
     * <p>
     * {银行名称}{卡类型}{卡尾号}
     * <p>
     * 2）退回支付用户零钱:
     * <p>
     * 支付用户零钱
     * <p>
     * 3）退还商户:
     * <p>
     * 商户基本账户
     * <p>
     * 商户结算银行账户
     * <p>
     * 4）退回支付用户零钱通:
     * <p>
     * 支付用户零钱通
     */
    @XmlElement(name = "refund_recv_accout")
    private String refundRecvAccout;

    /**
     * REFUND_SOURCE_RECHARGE_FUNDS 可用余额退款/基本账户
     * REFUND_SOURCE_UNSETTLED_FUNDS 未结算资金退款
     */
    @XmlElement(name = "refund_account")
    private String refundAccount;

    /**
     * API接口
     * VENDOR_PLATFORM商户平台
     */
    @XmlElement(name = "refund_request_source")
    private String refundRequestSource;

    /**
     * 退款给用户的金额，不包含所有优惠券金额
     */
    @XmlElement(name = "cash_refund_fee")
    private String cashRefundFee;
}
